package com.wanshi.blog.article.controller;


import com.wanshi.blog.article.req.CategoryREQ;
import com.wanshi.blog.article.service.ICategoryService;
import com.wanshi.blog.util.enums.Result;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

/**
 * <p>
 * 文章分类表 前端控制器
 * </p>
 *
 * @author 顽石教育-www.wanshi.com
 * @since 2021-09-07
 */
@RestController
@RequestMapping("/category")
public class CategoryController {

    @Autowired
    private ICategoryService categoryService;


    @PostMapping("/search")
    // 请求 /category/search
    public Result search(@RequestBody CategoryREQ req) {
        return categoryService.queryPage(req);
    }



}
